﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Threading;
using UnityEngine;

public class _44 : MonoBehaviour
{
    public delegate T GetEmployeeHanlder<out T>(string name);
    // Start is called before the first frame update
    void Start()
    {
        GetEmployeeHanlder<Manager> getEmployeeA = GetAManager;
        GetEmployeeHanlder<EmployeeA> getEmployeeB = getEmployeeA;


        //EmployeeA e = getEmployee("Mike");
    }

    public static Manager GetAManager(string name)
    {
        Debug.LogError("我是经理：" + name);
        return new Manager() { Name = name };
    }

    public static EmployeeA GetAemployee(string name)
    {
        Debug.LogError("我是雇员：" + name);
        return new EmployeeA() { Name = name };
    }
}
